import 'dart:io';

import 'package:path_provider/path_provider.dart';

class FileUtil {
  static Future<String> getTempLocalPath() async {
    try {
      var tempDir = await getTemporaryDirectory();
      String tempPath = tempDir.path;
      return tempPath;
    } catch (err) {
      print(err);
    }
  }

  static Future<String> getAPPLocalPath() async {
    try {
      var appDocDir = await getApplicationDocumentsDirectory();
      String appDocPath = appDocDir.path;
      return appDocPath;
    } catch (err) {
      print(err);
    }
  }

  static Future<String> getExternalPath() async {
    try {
      var appDocDir = await getExternalStorageDirectory();
      String appDocPath = appDocDir.path;
      return appDocPath;
    } catch (err) {
      print(err);
    }
  }
}
